package com.fernfx.xingtan.robredpacket.ui;

import android.content.Context;
import android.content.Intent;
import android.widget.TextView;

import com.fernfx.xingtan.R;
import com.fernfx.xingtan.common.base.BaseActivity;
import com.fernfx.xingtan.common.entity.robredpacket.RobredPacketInfoEntity;

import butterknife.BindView;

/**
 * Created by admin on 2018/8/13.
 * 点开后红包详情
 */

public class RobredPacketInfoActivity extends BaseActivity {
    public final static String ROBRED_PACKET_INFO_KEY = "robredPacketInfo";

    private Intent intent;

    @BindView(R.id.money_content_tv)
    TextView moneyContentTv;

    public static void start(Context context, RobredPacketInfoEntity robredPacketInfoEntity) {
        Intent intent = new Intent(context, RobredPacketInfoActivity.class);
        intent.putExtra(ROBRED_PACKET_INFO_KEY, robredPacketInfoEntity);
        context.startActivity(intent);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_robred_packet_info;
    }

    @Override
    protected void initView() {
        setToolbarTitle("红包信息");
    }

    @Override
    protected void initData() {
        intent = getIntent();
    }

    private String getStringText(String key) {
        return null != intent && intent.hasExtra(key) ? intent.getStringExtra(key) :  "";
    }

    private double getDoubleText(String key) {
        return null != intent && intent.hasExtra(key) ? intent.getDoubleExtra(key,0.0) :  0.0;
    }

}
